<template>
	<p><button @click="show = !show">显示/隐藏</button></p>
	<Transition name="slide-fade">
		<p v-show="show">Hello, World!</p>
	</Transition>
</template>

<script setup>
	import { ref } from "vue" 
	
	const show = ref(true) 
</script>

<style>
#app {
  font-family: Avenir, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  margin-top: 60px;
}
.slide-fade-enter-active{
  transition: all 0.3s ease-out;
}

.slide-fade-leave-active {
  transition: all 0.8s cubic-bezier(1, 0.5, 0.8, 1);
}

.slide-fade-enter-from,
.slide-fade-leave-to {
	transform: translateX(20px);
  opacity: 0;
}
</style>
